import request from '@/utils/request'
// 获取截至今天为止活动 
export function getOnLineActiveList () {
  return request({
    url: '/manage/active/getOnLineActiveList',
    method: 'get',
  })
}
// 状态修改
export function changeUserStatus (actId, actStatus) {
  const data = {
    actId,
    actStatus
  }
  return request({
    url: '/manage/active/changeStatus',
    method: 'put',
    data: data
  })
}
// 获取地址级联信息
export function getAddressAndCode () {
  return request({
    url: '/manage/active/getAddressAndCode',
    method: 'get',
  })
}
// 查询活动记录列表
export function listActivity (query) {
  return request({
    url: '/manage/active/list',
    method: 'get',
    params: query
  })
}

// 查询活动记录详细
export function getActivity (actId) {
  return request({
    url: '/manage/active/' + actId,
    method: 'get'
  })
}

// 新增活动记录
export function addActivity (data) {
  return request({
    url: '/manage/active',
    method: 'post',
    data: data
  })
}

// 修改活动记录
export function updateActivity (data) {
  return request({
    url: '/manage/active',
    method: 'put',
    data: data
  })
}

// 删除活动记录
export function delActivity (actId) {
  return request({
    url: '/manage/active/' + actId,
    method: 'delete'
  })
}
